<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">

<head>
<title>修改学生信息</title>
<meta name="keywords" content="迎新管理系统" />

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="本系统基于TP3.2开发，感谢开源">
<link rel="shortcut icon" href="favicon.ico">
<link href="/orientation/Public/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
<link href="/orientation/Public/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
<link href="/orientation/Public/css/animate.min.css" rel="stylesheet">
<link href="/orientation/Public/css/style.min862f.css?v=4.1.0" rel="stylesheet">
<link href="/orientation/Public/css/plugins/iCheck/custom.css" rel="stylesheet">
<link href="/orientation/Public/css/iconfont.css" rel="stylesheet"/>

    <!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;ie.html" />
<![endif]-->
</head>
<link href="/orientation/Public/css/style.css" rel="stylesheet"/>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
                    	<form action="<?php echo U('Excel/student_excel');?>" method="post" enctype="multipart/form-data" style='margin-bottom: 20px'>
                            <a href="javascript:;" class="a-upload">
                            	<input  type="file"  name="excel"/>选择文件
                            </a>
				            <button type="submit" class="btn btn-success radius">导入</button>
				           
			            </form>
			             <a href="<?php echo U('Excel/outExcel');?>" class="daochu">
                            <button class="btn btn-success radius " title="agreebtn">导出</button>
                           </a>
            <div class="ibox-content">
                <table class="table table-striped table-bordered table-hover dataTables-example">
                    <thead>
                    <tr>
                        <th>学号</th>
                        <th>姓名</th>
                        <th>性别</th>
                        <th>是否预报</th>
                        <th>班级名称</th>
                        <th>专业名称</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php if(is_array($res)): foreach($res as $key=>$val): ?><tr class="gradeX">
                            <td><?php echo ($val["studentid"]); ?></td>
                            <td><?php echo ($val["studentname"]); ?></td>
                            <td><?php echo ($val["studentsex"]); ?></td>
                            <td>
                            <?php if($val["forecast"] == 0): ?>否<?php else: ?>是<?php endif; ?>
                            </td>
                            <td><?php echo ($val["classname"]); ?></td>
                            <td><?php echo ($val["spename"]); ?></td>
                            <td data-id="<?php echo ($val["idcard"]); ?>" data-did="<?php echo ($val["idcard"]); ?>">
                            <a href="<?php echo U('Superadmin/informationModify',array('id'=>$val['idcard']));?>">
                            <button class="btn btn-sm btn-info " title="agreebtn">修改</button></a>
                            <button class="btn btn-sm btn-danger delstudent" title="disagreebtn">删除</button>
                            </td>
                        </tr>
                        
                        <!--
                        	作者：黄菊
                        	时间：2018-06-25
                        	描述：待员工实现兼容
                        -->
                       <!--<table id="tanchuan" style="display:none;position: fixed;top: 20%;left: 40%;z-index: 999;background-color: #2f4050;color: black;">
                			<tr align="center">
                				<td height="7.05%">学号</td>
                				<td height="7.05%"><?php echo ($val["studentid"]); ?></td>
                			</tr>
                			<tr align="center">
                				<td height="7.05%">姓名</td>
                				<td height="7.05%"><?php echo ($val["studentname"]); ?></td>
                			</tr>
                			<tr align="center">
                				<td height="7.05%">是否预报到</td>
                				<td height="7.05%"><?php echo ($val["forecast"]); ?></td>
                			</tr>
                			<tr align="center">
                				<td height="7.05%">性别</td>
                				<td height="7.05%"><?php echo ($val["studentsex"]); ?></td>
                			</tr>
                			<tr align="center">
                				<td height="7.05%">学生电话</td>
                				<td height="7.05%"><?php echo ($val["studentnumber"]); ?></td>
                			</tr>
                			<tr align="center">
                				<td height="7.05%">宿舍等级</td>
                				<td height="7.05%"><?php echo ($val["dormitorygrade"]); ?>级宿舍</td>
                			</tr>
                			<tr align="center">
                				<td height="7.05%">宿舍号</td>
                				<td height="7.05%"><?php echo ($val["dormitory"]); ?></td>
                			</tr>
                			<tr align="center">
                				<td height="7.05%">是否报到</td>
                				<td height="7.05%"><?php if($val["report"] == 0): ?>否<?php else: ?>是<?php endif; ?></td>
                			</tr>
                			<tr align="center">
                				<td height="7.05%">家庭地址</td>
                				<td height="7.05%"><?php echo ($val["address"]); ?></td>
                			</tr>
                			<tr align="center">
                				<td height="7.05%">是否有病史</td>
                				<td height="7.05%"><?php if($val["sick"] == 0): ?>否<?php else: ?>是<?php endif; ?></td>
                			</tr>
                			<tr align="center">
                				<td height="7.05%">贫困证明</td>
                				<td height="7.05%"><?php echo ($val["prove"]); ?></td>
                			</tr>
                			<tr align="center">
                				<td height="7.05%">是否买保险费</td>
                				<td height="7.05%"><?php if($val["insurance"] == 0): ?>否<?php else: ?>是<?php endif; ?></td>
                			</tr>
                			<tr align="center">
                				<td height="7.05%">班级名称</td>
                				<td height="7.05%"><?php echo ($val["classname"]); ?></td>
                			</tr>
                			<tr align="center">
                				<td height="7.05%">录取专业</td>
                				<td height="7.05%"><?php echo ($val["spename"]); ?></td>
                			</tr>
            			</tbody>--><?php endforeach; endif; ?>
                    </tbody>

                   
                </table>
                
            </div>
        </div>
    </div>
</div>
</div>
</body>


<script src="/orientation/Public/js/jquery.min.js?v=2.1.4"></script>
<script src="/orientation/Public/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/orientation/Public/js/plugins/jeditable/jquery.jeditable.js"></script>
<script src="/orientation/Public/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="/orientation/Public/js/plugins/dataTables/dataTables.bootstrap.js"></script>
<script src="/orientation/Public/js/content.min.js?v=1.0.0"></script>
<script>
    $(document).ready(function(){$(".dataTables-example").dataTable();var oTable=$("#editable").dataTable();oTable.$("td").editable("http://www.zi-han.net/theme/example_ajax.php",{"callback":function(sValue,y){var aPos=oTable.fnGetPosition(this);oTable.fnUpdate(sValue,aPos[0],aPos[1])},"submitdata":function(value,settings){return{"row_id":this.parentNode.getAttribute("id"),"column":oTable.fnGetPosition(this)[2]}},"width":"90%","height":"100%"})});function fnClickAddRow(){$("#editable").dataTable().fnAddData(["Custom row","New row","New row","New row","New row"])};
</script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
<script>
$(".a-upload").on("change", "input[type='file']", function () {
    var filePath = $(this).val();
    $(".fileerrorTip").html("").hide();
    var arr = filePath.split('\\');
    var fileName = arr[arr.length - 1];
    $(".showFileName").html(fileName);
});

    $('.delstudent').on('click',function () {
        var btn = $(this);
        var idcard = btn.parent().data('id');
        var param = {idcard: idcard};
        var url = "<?php echo U('Superadmin/delstudent');?>";
        $.ajax({
            url: url,
            data: param,
            dataType: 'json',
            type: 'post',
            success: function (data) {
                var dotr = btn.closest('tr');
                alert(data.info);
                if (data.status == 1) {
                    dotr.remove();
                }
            },
            error: function () {
                alert('操作失败');
            }
        })
    })
    
    $('.gradeX').click(function (){
    	$('#tanchuan').css('display', 'block');
    })
    $('body').dblclick(function () {
    	$('#tanchuan').css('display', 'none');
    })
</script>
</html>